package cn.cqie.attendance.manager.dao;

import cn.cqie.attendance.manager.pojo.AdminClasses;
import cn.cqie.attendance.manager.pojo.AdminClassesAdd;
import cn.cqie.attendance.manager.pojo.AdminClassesSerch;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 697
 * @date 2021/6/18 17:16
 */
@Mapper
public interface AdminClassesDao {


    /**
     * 查询所有班级信息 条件组合查询
     * @param adminClassesSerch
     * @return
     */
    List<AdminClasses> queryAllClassesInfo(@Param("adminClassesSerch") AdminClassesSerch adminClassesSerch);


    /**
     * 查询班级是否存在
     * @param adminClassesAdd
     * @return
     */
    int queryClassCount(@Param("adminClassesAdd") AdminClassesAdd adminClassesAdd);

    /**
     * 新增班级
     * @param adminClassesAdd
     * @return
     */
    int addClasses(@Param("adminClassesAdd") AdminClassesAdd adminClassesAdd);


    /**
     * 根据班级名查询班级数量信息
     * @param className 班级名
     * @return 数量
     */
    int queryCountClassesInfoByClassName(String className);


    /**
     * 根据ID查询班级信息
     * @param id ID
     * @return
     */
    List<AdminClasses> queryClassesInfoById(Integer id);


    /**
     * 根据ID修改班级信息
     * @param adminClassesAdd 班级
     * @return
     */
    int updateClassesInfoById(@Param("adminClassesAdd") AdminClassesAdd adminClassesAdd);

}
